﻿using System.Collections.Generic;
using Shuba.Model;

namespace Shuba.Business
{
    public class Loan
    {
        private Data.Loan _Loan;

        public Loan()
        {
            _Loan = new Data.Loan();
        }

        public List<AppCrossReffInfo> GetList(string value)
        {
            return _Loan.GetList(value);
        }

        public LoanInfo Get(string CIF_NUMBER, string LOAN_NUMBER)
        {
            return _Loan.Get(CIF_NUMBER.Trim(), LOAN_NUMBER.Trim());
        }

        public LoanInfo GetApprovalByID(string CIF_NUMBER, string LOAN_NUMBER)
        {
            return _Loan.GetApprovalByID(CIF_NUMBER.Trim(), LOAN_NUMBER.Trim());
        }

        public List<LoanInfo> GetListApproval(string value, string UpdateBy)
        {
            return _Loan.GetListApproval(value, UpdateBy);
        }

        public void Save(LoanInfo _LoanInfo)
		{
            _Loan.Save(_LoanInfo);
		}

        public int Approve(string CIF_NUMBER, string LOAN_NUMBER, string ActType)
        {
            return _Loan.Approve(CIF_NUMBER.Trim(), LOAN_NUMBER.Trim(), ActType);
        }

        public int Reject(string CIF_NUMBER, string LOAN_NUMBER)
        {
            return _Loan.Reject(CIF_NUMBER.Trim(), LOAN_NUMBER.Trim());
        }
    }
}
